<?php 
	//Open When Test
	error_reporting(E_ALL);
	
	//当前路径
	$root_path = dirname(__FILE__);
	$root_path = preg_replace('/\\\\/', '/', $root_path);
	define('ROOT_PATH', $root_path);
	
	//包含进基本函数库
	include(ROOT_PATH . '/protected/includes/fun.php');

	//加载配置文件
	init_site();
    
	if(AGENT === 'wap'){
		//wap转向
		header('Location: wap');
		exit;
	}
	
// 	require_once ROOT_PATH . '/protected/web/wiki/app/WikiController.php';
	$c = &c('wiki');

	call_user_func(array($c, ACT));
?>